package com.aa.studentmanage.ui;

import com.aa.studentmanage.entity.LoginEntity;
import com.aa.studentmanage.utils.InputHelper;

public class Menu {

    public static int chooseLoginMenu() {
        System.out.println("----------------------------------------------------");
        System.out.println();
        System.out.println("\t\t\t\t学 生 管 理 系 统");
        System.out.println();
        System.out.println("请选择登录方法: 1、学生登录\t 2、管理员登录\t 0、退出");
        System.out.println();
        System.out.println("----------------------------------------------------");
        System.out.print("请选择(0-2):");
        return InputHelper.getInt();
    }

    public static LoginEntity loginMenu(String type){
        System.out.println("----------------------------------------------------");
        System.out.println();
        System.out.println("\t\t\t\t\t"+ type +"登录窗口");
        System.out.println();
        System.out.print("请输入"+ type +"帐号:");
        String loginName = InputHelper.getString();
        System.out.print("请输入"+ type +"密码:");
        String loginPwd = InputHelper.getString();
        System.out.println();
        System.out.println("----------------------------------------------------");
        return new LoginEntity(loginName,loginPwd);
    }
}
